<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link rel="stylesheet" href="skin/base.css" type="text/css" >
<link rel="stylesheet" href="skin/more.css" type="text/css" >
<link rel="stylesheet" href="skin/btn.css" type="text/css" />
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/config.js"></script>
<script src="js/common.js"></script>
</head>
<body ontouchstart>
<div id="content" >
	<div class="more">
    	<div class="item" id="more">
    		 <ul>
				<li ontouchstart="zy_touch('down')" onclick="oauth('user_info')"><strong class="myinfo">我的资料</strong><em id="nick"></em></li>
				<li ontouchstart="zy_touch('down')" onclick="oauth('user_up_pass')"><strong class="myinfo">修改密码</strong><em id="username"></em></li>
		    </ul>
			
		   <ul>
		      <li ontouchstart="zy_touch('down')" onclick="oauth('user_mobile')"><strong class="myinfo">绑定手机号</strong><em id="mobile"></em></li>
		      <li ontouchstart="zy_touch('down')" onclick="oauth('user_bind')"><strong class="myinfo">设置关联帐号</strong><em id="bind"></em></li>
		    
		      <li ontouchstart="zy_touch('down')" onclick="jump('skin')"><strong class="about">风格设置</strong><em id="skin"></em></li>
		      <li ontouchstart="zy_touch('down')" onclick="update_cache()"><strong class="about">更新缓存</strong></li>
		    </ul>
			
		    <ul>
		      <li ontouchstart="zy_touch('down')" onclick="upgrade()"><strong class="about">版本更新</strong></li>
		      <li ontouchstart="zy_touch('down')" onclick="jump('help')"><strong class="about">软件帮助</strong></li>
		      <li ontouchstart="zy_touch('down')" onclick="jump('about')"><strong class="about">关于我们</strong></li>
		    </ul>
    	</div>
	</div>
</div>
</body>
<script>
    zy_init();
	function oklogin(){

		var txt = localStorage['skin_title']?localStorage['skin_title']:'默认风格';
		$$('skin').innerHTML= txt;
		
		if(localStorage['u_mobile']){
			$$('mobile').innerHTML= localStorage['u_mobile'];
		}
		
		if(localStorage['u_nick']){
			$$('nick').innerHTML= localStorage['u_nick'];
		}
	}
	
	function jump(windowname){
		uexWindow.open(windowname, '0', windowname+'.html', 2, '', '', 0);
	}
	
	function update_cache(){
		var url = app_path + 'index.php?m=iapp&c=app&a=setting';
		uexXmlHttpMgr.open(0, 'post', url, "8000");
		uexXmlHttpMgr.send(0);
	}
	
	function upgrade(){
		var url = app_path+'index.php?m=iapp&c=app&a=upgrade&ver='+localStorage['version']+'&platform='+localStorage['device'];
		uexXmlHttpMgr.open(1,'post',url,"8000");
		uexXmlHttpMgr.send(1);
	}
	
	function oauth(url){
		if (c_l()) {
			if(url == 'user_talk'){
				localStorage['userid'] = localStorage['u_id'];
				localStorage['user_home_nickname'] = localStorage['u_nick'];
			}
			uexWindow.open(url, '0', url+'.html', 2, '', '', 0);
		}else{
			localStorage['login'] = 'more';
			gologin();
		}
	}
	
	window.uexOnload=function(type){
		if(!type){
			uexWindow.setBounce("1");
			uexXmlHttpMgr.onData = function(opId, status, data){
				uexXmlHttpMgr.close(opId);
				if (status == 1) {
					data=JSON.parse(data);
					uexWindow.closeToast();
					if(opId == 0){
						if (data['success'] == 'yes') {
							localStorage['skin'] = data['data']['skin'];
							localStorage['bg'] = data['data']['bg'];
							localStorage['config'] = data['data']['config'];
							
							for(k in l_footer){
								uexWindow.evaluateScript(k,0,'uexWindow.close(0)');
							}
							
							if (pattern_type == "simple") {
								uexWindow.evaluateScript('root',0,'closePopover("menu")');
							}else if(pattern_type == "winphone"){
								uexWindow.evaluateScript('main_winphone',0,'uexWindow.close(0)');
							}
							
							uexWindow.evaluateScript('root',0,'openmain()');
							uexWindow.toast("0","5",'缓存更新成功~',2000);
							uexWindow.evaluateScript('setting',0,'uexWindow.close(0)');
							
						}else{
							uexWindow.toast("0","5",'缓存更新失败~',1000);
						}
					}else if(opId == 1){
						if (data['success'] == 'yes') {
							uexWindow.confirm('软件更新', data['msg'], ["更新", "稍后"]);
							uexWindow.cbConfirm = function(cbopId, dataType, cbdata){
								if (cbdata == 0) {
									if (localStorage['device'] == 0) {
										loadLink(data['data']['iphone_updateFileUrl']);
									}else if (localStorage['device'] == 1) {
										loadLink(data['data']['android_File']);
									}
								}else {
									return;
								}
							}
						}else if (data['success'] == 'no') {
							uexWindow.alert('软件更新', data['msg'], '关闭');
						}else {
							uexWindow.alert('软件更新', data['msg'], '关闭');
						}
					}
					
				}else if (status == -1) {
					uexWindow.toast("0","5",'链接超时，请重试~',2000);
				}
			}

			oklogin();
		}
	}
    </script>
</html>